<template>
	<view>

	</view>
</template>

<script>
	import {
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {

			};
		},
		onLoad() {
			if (!uni.getStorageSync('dktoken')) {
				uni.reLaunch({
					url:'/pages/index/login'
				})
				return
			}
			this.setRoleId(uni.getStorageSync('dkuserinfo').group_id)
			if(uni.getStorageSync('loanroleId')==1){
				uni.switchTab({
					url: '/pages/tabbar/home'
				})
			}
			if(uni.getStorageSync('loanroleId')==2){
				uni.switchTab({
					url: '/pages/tabbar/homex'
				})
			}
			if(uni.getStorageSync('loanroleId')==3){
				uni.switchTab({
					url: '/pages/tabbar/homea'
				})
			}
		},
		methods: {
			...mapMutations(['setRoleId']),
		}
	}
</script>

<style lang="scss">

</style>